package managers.socialNetworkManagers;

import java.awt.Color;
import java.util.HashMap;

import spotGUI.mainFrameGUI.MainFrame;
import utils.SocialUserData;

public class SocialNetworkFeedbackManager {

	public static final int DEFAULT = 0;
	public static final int WARNING = 1;
	
	private MainFrame feedbackView;
	
	public SocialNetworkFeedbackManager (MainFrame feedbackView) {
		
		this.feedbackView = feedbackView;
		
	}

	public void updateStatus(String message, int type) {
			switch (type) {
			case WARNING:
				feedbackView.getStatusBar().setStatus(message, Color.RED.darker().darker());
				break;
			default:
				feedbackView.getStatusBar().setStatus(message, Color.BLACK);
			}
		}
	
	public void fillUsersList (HashMap<Integer, SocialUserData> socialUsersData) {
		
		feedbackView.getSocialNetworkPanel().fillSidebar(socialUsersData);
	}
	
	public void updateElements () {
		feedbackView.getSocialNetworkPanel().updateElements();
	}
	
	public void update() {
		feedbackView.getSocialNetworkPanel().repaint();
	}
}
